﻿using System.Collections.Generic;
using System.Data;
using PPI.Entities.Inspections;
using VMind.Global;

namespace PPI.Client.Logic.Distribution
{
    public class LMap
    {
        public static List<EMap> SelectAllIdName()
        {
            DataTable dt = WebConsumer.Distribution.WDistributionMap.SelectAllIdName().Tables[0];
            List<EMap> lstMaps = new List<EMap>();

            foreach (DataRow drTreatment in dt.Rows)
            {
                EMap map = new EMap();

                map.Id = ConvertHelper.ToInt32(drTreatment["PolygonChildId"]);
                map.Name = drTreatment["PolygonChildName"].ToString();

                lstMaps.Add(map);
            }

            return lstMaps;
        }
    }
}
